﻿<Window x:Class="ResourceBlender.Express.DialogBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:ResourceBlender.Express"
    Title="Information" ResizeMode="NoResize" Style="{StaticResource {x:Type Window}}"
    MinHeight="100" MinWidth="200" MaxWidth="400" SizeToContent="WidthAndHeight" 
    WindowStartupLocation="CenterOwner"
    loc:WindowService.EscapeClosesWindow="True"
    Icon="/ResourceBlenderExpress;component/Resources/images/resourceblender.ico">
    <Window.CommandBindings>
        <CommandBinding Command="loc:ResourceBlenderCommands.AcceptDialog" Executed="AcceptDialog" />
    </Window.CommandBindings>
    <Window.Resources>
        <Style x:Key="DialogFooter">
            <Setter Property="StackPanel.Background" Value="WhiteSmoke" />
        </Style>
        <Style TargetType="{x:Type Table}">
            <Setter Property="BorderBrush" Value="Black" />
            <Setter Property="BorderThickness" Value="0.5" />
            <Setter Property="Background" Value="WhiteSmoke" />
        </Style>
        <Style TargetType="{x:Type TableCell}">
            <Setter Property="Padding" Value="3" />
            <Setter Property="BorderBrush" Value="Black" />
            <Setter Property="BorderThickness" Value="0.5" />
        </Style>
    </Window.Resources>
    <Grid Margin="6">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Image Grid.Row="0" Grid.Column="0" x:Name="img" Width="32" Height="32" Margin="5,12" />
        
        <TextBlock Grid.Row="0" Grid.Column="1" x:Name="txtMessage" Padding="2,5,2,17" TextWrapping="Wrap" />
        <RichTextBox Grid.Row="0" Grid.Column="1" x:Name="txtRichMessage" Padding="2,5,2,17" MinWidth="100" BorderThickness="0" BorderBrush="Transparent"
                     VerticalScrollBarVisibility="Auto" Visibility="Collapsed" Background="Transparent" IsReadOnly="True" Cursor="Arrow" />
        
        <StackPanel Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" Style="{StaticResource DialogFooter}">
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnOK" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.OK}">OK</Button>
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnYesAll" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.YesToAll}">Yes To All</Button>
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnYes" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.Yes}">Yes</Button>
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnNo" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.No}">No</Button>
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnNoAll" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.NoToAll}">No To All</Button>
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnCancel" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.Cancel}">Cancel</Button>
            
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnAbort" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.Abort}">Abort</Button>
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnRetry" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.Retry}">Retry</Button>
            <Button MinWidth="70" Visibility="Collapsed" x:Name="btnIgnore" Command="loc:ResourceBlenderCommands.AcceptDialog" CommandParameter="{x:Static loc:DialogBox+DialogBoxButton.Ignore}">Ignore</Button>
        </StackPanel>
    </Grid>
</Window>
